home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntlib43 / mntlib / cfspeed.c < prev    next >
C/C++ Source or Header  |  1993-10-11  |  592b  |  41 lines

  1. /*
  2. Public domain termios cf[get|set][i|o]speed() for the MiNT library
  3. 10 October 1993 entropy@terminator.rs.itd.umich.edu -- first attempt
  4. */
  5.  
  6. #include <types.h>
  7. #include <termios.h>
  8.  
  9. speed_t
  10. cfgetispeed(stp)
  11.   const struct termios *stp;
  12. {
  13.   return stp->_c_ispeed;
  14. }
  15.  
  16. speed_t
  17. cfgetospeed(stp)
  18.   const struct termios *stp;
  19. {
  20.   return stp->_c_ospeed;
  21. }
  22.  
  23. int
  24. cfsetispeed(stp, baudcode)
  25.   struct termios *stp;
  26.   speed_t baudcode;
  27. {
  28.   stp->_c_ispeed = baudcode;
  29.   return 0;
  30. }
  31.  
  32. int
  33. cfsetospeed(stp, baudcode)
  34.   struct termios *stp;
  35.   speed_t baudcode;
  36. {
  37.   stp->_c_ospeed = baudcode;
  38.   return 0;
  39. }
  40.  
  41.